<template>
<div class="box">
    <header class="header">
      <van-nav-bar title="订单详情" left-text="返回" left-arrow @click-left="$router.push('/')" />
      <van-skeleton>
  <template #template>
    <div :style="{ display: 'flex', width: '100%' }">
      <van-skeleton-image />
      <div :style="{ flex: 1, marginLeft: '16px' }">
        <van-skeleton-paragraph row-width="60%" />
        <van-skeleton-paragraph />
        <van-skeleton-paragraph />
        <van-skeleton-paragraph />
      </div>
    </div>
  </template>
</van-skeleton>
    </header>
    <main class="content">
      <van-swipe-cell v-for="item in store.orderList ">
        <van-card :num="item.count" :price="item.price"  :title="item.title" class="goods-card" :thumb="item.image" />
      </van-swipe-cell>
      <li v-for="item in list">
        <div><img :src="item.image" alt=""></div>
<div>{{ item.title  }}</div>
      </li>
    </main>
  </div>
</template>
<script setup>
import { useCounterStore } from '@/stores/counter'
// 可以在组件中的任意位置访问 `store` 变量 ✨
const store = useCounterStore()

import {ref,onMounted} from 'vue'
import request from '@/tool/request'
const list=ref([])
// pagination, pageNum
const pagination=ref(1)
onMounted(()=>{
  request.get('/list',{
    params:{
      pagination:pagination.value,
      pageNum:3
    }
  }).then(res=>{
    if(res.data.code==200){
      list.value=res.data.data
    }
  })
})
</script>

<style lang="scss" scoped>

</style>